<?php
/**
 * Created by PhpStorm.
 * User: dreamy
 * Date: 2019-05-30
 * Time: 15:36
 */
namespace common\models;

use Yii;

/**
 * This is the model class for table "tally_project".
 *
 * @property int $id 项目ID
 * @property string $title 项目名称
 * @property int $tally_id 账本ID
 * @property int $uid 创建者
 * @property int $type 项目关联账套
 * @property int $is_sys 系统默认
 * @property string $created_time 创建时间
 * @property string $updated_time 更新时间
 */
class TallyProject extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'tally_project';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['uid', 'tally_id','type', 'is_sys'], 'integer'],
            [['uid','tally_id','type','title'], 'required'],
            [['created_time', 'updated_time'], 'safe'],
            [['title'], 'string', 'max' => 60],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => 'Title',
            'tally_id' => 'Tally Id',
            'uid' => 'Uid',
            'type' => 'Type',
            'is_sys' => 'Is Sys',
            'created_time' => 'Created Time',
            'updated_time' => 'Updated Time',
        ];
    }
}
